﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;
using Newtonsoft.Json;

namespace poco
{
    public class ContactJsonSerializer : IContactSerializer
    {
        public Contact Deserialize(string body)
        {
            return JsonConvert.DeserializeObject<Contact>(body);
        }

        public string Serialize(Contact contact)
        {
            return JsonConvert.SerializeObject(contact, Formatting.None, new JsonSerializerSettings() { DefaultValueHandling = DefaultValueHandling.Ignore });
        }
    }
}
